Ext.define('Holo.view.user.WindowsLogin', {
    extend: 'Ext.window.Window',
    alias : 'widget.windowslogin',
    height: 171,
    width: 332,
    layout: {
        type: 'fit'
    },
    closable: false,
    title: Label.get('LAB001'),

    initComponent: function() {
        var me = this;

        Ext.applyIf(me, {
            items: [
	                {
	                    xtype: 'form',
	                    url: 'database/CONNEXION.php',
	                    layout: {
	                        align: 'center',
	                        pack: 'center',
	                        type: 'vbox'
	                    },
	                    bodyPadding: 10,
	                    frameHeader: false,
	                    items: [
	                        {
	                            xtype: 'textfield',
	                            name: 'email',
	                            allowBlank: false,
	                            value: 'user@me.com',
	                            blankText:Error.get('ERR005'),
	                            vtype: 'email',
	                            vtypeText :Error.get('ERR001'),
	                            maxLength:100,
	                            maxLengthText:Error.get('ERR003'),
	                            minLength:5,
	                            minLengthText:Error.get('ERR002'),
	                            fieldLabel: Label.get('LAB002'),
	                        },
	                        {
	                            
	                            xtype: 'textfield',
	                            inputType: 'password',
	                            value:'123',
	                            name: 'pwd',
	                            maxLength:12,
	                            minLength:3,
	                            vtype:'alphanum',//à faire : créer notre propre vtype pour les pwd
	                            allowBlank: false,
	                            blankText:Error.get('ERR005'),
	                            alphanumText:Error.get('ERR004'),
	                            maxLengthText:Error.get('ERR003'),
	                            minLengthText:Error.get('ERR002'),
	                            fieldLabel: Label.get('LAB003'),
	                        }
	                    ],
	                   
	                    buttons :[{
					text: Label.get('LAB004'),
					action:'connect',
					formBind: true, //only enabled once the form is valid
					disabled: true
            	                    }]
                        
                     
                    
                }
            ]
        });

        me.callParent(arguments);
    }

});